package com.shop.entity;

import java.util.Objects;

public class GoodsListVO {
    private int gd_id;         //商品详情id
    private double gd_price;   //商品单价
    private int gd_num;        //商品数量
    private int g_id;           //商品id
    private String g_name;      //商品名
    private String img_path;         //图片的路径
    private String gfour_name;   //四级分类名称
    private String g_data;
    private String g_datail;

    public GoodsListVO(int gd_id, double gd_price, int gd_num, int g_id, String g_name, String img_path, String gfour_name) {
        this.gd_id = gd_id;
        this.gd_price = gd_price;
        this.gd_num = gd_num;
        this.g_id = g_id;
        this.g_name = g_name;
        this.img_path = img_path;
        this.gfour_name = gfour_name;
    }

    public GoodsListVO() {
    }

    public GoodsListVO(int gd_id, double gd_price, int gd_num, int g_id, String g_name, String img_path, String gfour_name, String g_data, String g_datail) {
        this.gd_id = gd_id;
        this.gd_price = gd_price;
        this.gd_num = gd_num;
        this.g_id = g_id;
        this.g_name = g_name;
        this.img_path = img_path;
        this.gfour_name = gfour_name;
        this.g_data = g_data;
        this.g_datail = g_datail;
    }

    public int getGd_id() {
        return gd_id;
    }

    public void setGd_id(int gd_id) {
        this.gd_id = gd_id;
    }

    public double getGd_price() {
        return gd_price;
    }

    public void setGd_price(double gd_price) {
        this.gd_price = gd_price;
    }

    public int getGd_num() {
        return gd_num;
    }

    public void setGd_num(int gd_num) {
        this.gd_num = gd_num;
    }

    public int getG_id() {
        return g_id;
    }

    public void setG_id(int g_id) {
        this.g_id = g_id;
    }

    public String getG_name() {
        return g_name;
    }

    public void setG_name(String g_name) {
        this.g_name = g_name;
    }

    public String getImg_path() {
        return img_path;
    }

    public void setImg_path(String img_path) {
        this.img_path = img_path;
    }

    public String getGfour_name() {
        return gfour_name;
    }

    public void setGfour_name(String gfour_name) {
        this.gfour_name = gfour_name;
    }

    public String getG_data() {
        return g_data;
    }

    public void setG_data(String g_data) {
        this.g_data = g_data;
    }

    public String getG_datail() {
        return g_datail;
    }

    public void setG_datail(String g_datail) {
        this.g_datail = g_datail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GoodsListVO that = (GoodsListVO) o;
        return gd_id == that.gd_id && Double.compare(that.gd_price, gd_price) == 0 && gd_num == that.gd_num && g_id == that.g_id && Objects.equals(g_name, that.g_name) && Objects.equals(img_path, that.img_path) && Objects.equals(gfour_name, that.gfour_name) && Objects.equals(g_data, that.g_data) && Objects.equals(g_datail, that.g_datail);
    }

    @Override
    public int hashCode() {
        return Objects.hash(gd_id, gd_price, gd_num, g_id, g_name, img_path, gfour_name, g_data, g_datail);
    }

    @Override
    public String toString() {
        return "GoodsListVO{" +
                "gd_id=" + gd_id +
                ", gd_price=" + gd_price +
                ", gd_num=" + gd_num +
                ", g_id=" + g_id +
                ", g_name='" + g_name + '\'' +
                ", img_path='" + img_path + '\'' +
                ", gfour_name='" + gfour_name + '\'' +
                ", g_data='" + g_data + '\'' +
                ", g_datail='" + g_datail + '\'' +
                '}';
    }
}
